/**
 * @Author: leibidong
 * @Description:redis连接配置
 * @File:  redis
 * @Version: 1.0.0
 * @Date: 2021/7/3 16:15
 */

package dao

import "github.com/go-redis/redis"

var rdb *redis.Client

/**
 * @Author leibidong
 * @Description 初始化redis连接
 * @Date  2021/7/11 17:35
 **/
func InitRedis() *redis.Client {
	rdb = redis.NewClient(&redis.Options{
		Addr:     "localhost:6379",
		Password: "", // no password set
		DB:       0,  // use default DB
	})

	return rdb
}
